﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.Practices.Mobile.ContainerModel.Tests
{
	[TestClass]
	public class ContainerModuleFixture
	{
		[TestMethod]
		public void ModuleConfiguresModule()
		{
			var module = new TestModule();
			var container = new Container();

			module.Configure(container);

			Assert.IsNotNull(container.Resolve<IFoo>());
		}

		public class TestModule : IContainerModule
		{
			public void Configure(Container container)
			{
				container.Register<IFoo>(c => new Foo());
			}
		}

		public interface IFoo { }
		public class Foo : IFoo { }
	}
}
